package com.example.demo.service.impl;

import com.example.demo.mapper.UserMapper;
import com.example.demo.module.UserBean;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:Samson
 * @Description:
 * @Date:Created in 2017/5/17.
 */
@Repository
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public UserBean login(String uName, String uPwd) {
        return userMapper.login(uName,uPwd);
    }

    @Override
    public UserBean selectById(String id) {
        return userMapper.selectById(id);
    }

    @Override
    public void deleteById(String id) {

    }

    @Override
    public int update(UserBean userBean) {
        return userMapper.update(userBean);
    }

    @Override
    public int add(UserBean userBean) {
        return userMapper.add(userBean);
    }

    @Override
    public List<UserBean> findAll() {
        return null;
    }

    @Override
    public UserBean selectUserIsThird(String uPassword) {
        return userMapper.selectUserIsThird(uPassword);
    }

    @Override
    public UserBean findById(String id) {
        return userMapper.findById(id);
    }

    @Override
    public UserBean selectByUserBind(String openId, String password) {
        return userMapper.selectByUserBind(openId,password);
    }
}
